package cn.dansj.repository;

import cn.dansj.entity.ShortLink;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface ShortLinkRepository extends JpaRepository<ShortLink, String>, JpaSpecificationExecutor<ShortLink> {
    ShortLink findByUrlAndUserId(String url, int userId);

    int countAllByUserId(int userId);
}
